package com.character.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * (User)表实体类
 *
 * @author makejava
 * @since 2021-12-07 19:23:27
 */
@SuppressWarnings("serial")
@TableName("tbl_user")
@Data
public class User extends Model<User> {
    //id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //用户登录的用户名,唯一
    private String loginName;
    //真实姓名
    private String userName;
    //邮箱,唯一
    private String email;
    //手机号,唯一
    private String phone;
    //0男1女
    private Integer sex;
    //头像(存储url)
    private String headPortrait;
    //密码
    private String password;
    //盐加密
    private String salt;
    //0正常1异常
    private Integer status;
    //部门编号
    private Integer deptId;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //创建人
    private String creator;
    //修改人
    private String updater;
    //修改时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    //逻辑删除 (0存在,1删除)
    private Integer flag;
    //备注
    private String remark;
}


